<?php

namespace services\models\minisite;

#use services\models\minisite\MActivityShowFeelReply;

/**
 * This is the ActiveQuery class for [[\common\models\MActivityShowFeelReply]].
 *
 * @see \common\models\MActivityShowFeelReply
 */
class TActivityShowFeelReplyQuery extends \yii\db\ActiveQuery
{
    /*public function active()
    {
        return $this->andWhere('[[status]]=1');
    }*/

    /**
     * @inheritdoc
     * @return \common\models\minisite\MActivityShowFeelReply[]|array
     */
    public function all($db = null)
    {
        return parent::all($db);
    }

    /**
     * @inheritdoc
     * @return \common\models\minisite\MActivityShowFeelReply|array|null
     */
    public function one($db = null)
    {
        return parent::one($db);
    }


    public function deleteAllByIds($ids)
    {
        $ids = is_array($ids) ? implode(',', $ids) : $ids;
        if (!is_array($ids)) {
            $ids = explode(',', $ids);
        }
        $newids = array_filter($ids, function ($v) {
            if (is_numeric($v)) return true;
            return false;
        });
        if (count($newids) != count($ids))
            return 0;
        $ids = implode(',', $ids);

        return (new $this->modelClass)->deleteAll("id in ( {$ids} )");

    }
}
